class Solution(object):
    def countConsistentStrings(self, allowed, words):
        t1 = set(allowed)
        ans = 0
        for word in words:
            if not set(word) - t1:
                ans += 1
        return ans
